package com.gy.smartmanagement.login;

import android.os.Bundle;


import com.gy.smartmanagement.base.activity.BaseToolbarActivity;
import com.gy.smartmanagement.R;
import com.gy.smartmanagement.utils.ActivityUtils;
import com.gy.smartmanagement.login.dagger.LoginModule;
import com.gy.smartmanagement.login.mvp.LoginPresenter;

import javax.inject.Inject;


/**
 * Created by MVPModule on 11/15/2019 11:55
 */
public class LoginActivity extends BaseToolbarActivity {

  @Inject
  LoginPresenter mPresenter;

  @Override
  public int getLayoutResId() {
    return R.layout.activity_base;
  }

  @Override
  public void initFragment(Bundle savedInstanceState) {
    LoginFragment mFragment = LoginFragment.newInstance();
    ActivityUtils.addFragmentToActivity(fragmentManager, mFragment, R.id.container,
        LoginFragment.TAG);
    getApiServiceComponent().getLoginComponent(new LoginModule(mFragment))
        .inject(this);
  }
}
